home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / netzwerk / envoyarexx / install < prev    next >
Text File  |  1995-12-09  |  8KB  |  279 lines

  1. ; $VER: Install 1.0 (09.12.95)
  2.  
  3. (transcript "Installing EnvoyARexx...")
  4.  
  5. ;
  6. ; Defaults
  7. ;
  8.  
  9. (set librarydest "LIBS:")
  10. (set servicedest "SYS:")
  11. (set clidest "C:")
  12. (set rexxdest "REXX:")
  13. (set docdest "SYS:")
  14.  
  15.  
  16. ;
  17. ; String-definitions
  18. ;
  19.  
  20. (set #WhichFiles    (cat "Which files of the EnvoyARexx-package do you want to "
  21.                          "install on this Amiga? (Read the help-page for more "
  22.                          "information)"))
  23. (set #WhichFilesHlp (cat "envoyarexx.library: the client of the EnvoyARexx "
  24.                          "package. Only needed on those machines which want "
  25.                          "to connect to remote machines.\n\n"
  26.                          "envoyarexx.service: the server of the package. "
  27.                          "The server is required for machines which will "
  28.                          "be connected from remote clients.\n\n"
  29.                          "CLI commands: CLI equivalents of the envoyarexx.library's "
  30.                          "rexx-functions. Useful for batch-files. CLI commands "
  31.                          "require the envoyarexx.library.\n\n"
  32.                          "Rexx example: simple example of EnvoyARexx.\n\n"
  33.                          "Manual: documenation of EnvoyARexx."))
  34. (set #Library            "envoyarexx.library")
  35. (set #Service            "envoyarexx.service")
  36. (set #CLICommands        "CLI commands")
  37. (set #Example            "Rexx example script")
  38. (set #Manual             "EnvoyARexx manual")
  39. (set #DoNothing          "Thank you for using the EnvoyARexx installer... ;-)")
  40. (set #CLIMessage    (cat "The CLI commands you chose to install require the "
  41.                          "envoyarexx.library. Thus, the library will be "
  42.                          "installed, too."))
  43. (set #LibraryDest   (cat "Please select the path where to install "
  44.                          "the envoyarexx.library. No new drawer will be created."))
  45. (set #LibraryHelp   (cat "No new drawer will be created for the library.\n\n"
  46.                          "Note that it's not absolutely required to place "
  47.                          "the library to LIBS:, as long as your scripts and "
  48.                          "applications are able to find this file somewhere else."))
  49. (set #InstallLib         "Installing envoyarexx.library...")
  50. (set #ServiceDest   (cat "Please select the path where the envoyarexx.service "
  51.                          "should be installed. No new drawer will be created."))
  52. (set #ServiceHelp   (cat "No new drawer will be created for the service.\n\n"
  53.                          "You should copy the service into your Envoy/Services "
  54.                          "directory."))
  55. (set #InstallSvc         "Installing envoyarexx.service...")
  56. (set #SvcMagicIcon       "Do you want to install the MagicWB-icon of the service?")
  57. (set #CLIDest       (cat "Please select the path where the EnvoyARexx CLI commands "
  58.                          "should be installed. No new drawer will be created."))
  59. (set #InstallCH          "Installing CLI command 'ConnectHost'...")
  60. (set #InstallDCH         "Installing CLI command 'DisConnectHost'...")
  61. (set #RexxDest      (cat "Please select the path where the EnvoyARexx example "
  62.                          "scripts should be installed. No new drawer will be created."))
  63. (set #InstallRexx1       "Installing ARexx-script 'Example.earexx'...")
  64. (set #WhichManuals       "Which documents should be installed?")
  65. (set #ManGuide           "EnvoyARexx.guide")
  66. (set #ManDVI             "EnvoyARexx.dvi")
  67. (set #DocDest       (cat "Please select the path where the manual(s) "
  68.                          "should be installed. No new drawer will be created."))
  69. (set #DocWorking         "Installing manual(s)...")
  70.  
  71. (set #ByeTextSvc    (cat "Please refer the manual for more information "
  72.                          "about EnvoyARexx.\n\nDon't forget to activate the "
  73.                          "newly installed service using Envoy's Services Manager."))
  74. (set #ByeText       (cat "Please refer the manual for more information "
  75.                          "about EnvoyARexx."))
  76.  
  77.  
  78. ;
  79. ; Select which files to install
  80. ;
  81.  
  82. (set cfiles (askoptions (prompt #WhichFiles)
  83.                        (help #WhichFilesHlp)
  84.                        (choices #Library
  85.                                 #Service
  86.                                 #CLICommands
  87.                                 #Example
  88.                                 #Manual
  89.                        )
  90.            )
  91. )
  92.  
  93.  
  94. ;
  95. ; Exit if nothing was selected
  96. ;
  97.  
  98. (if (= cfiles 0)
  99.   ((message #DoNothing) (exit (quiet)))
  100. )
  101.  
  102.  
  103. ;
  104. ; Notify that CLI commands require the library (if selected)
  105. ;
  106.  
  107. (if (and (<> 0 (bitand cfiles 4)) (= 0 (bitand cfiles 1)))
  108.   (message (#CLIMessage))
  109. )
  110.  
  111.  
  112. ;
  113. ; Install the envoyarexx.library, if selected
  114. ;
  115.  
  116. (if (or (<> 0 (bitand cfiles 1)) (<> 0 (bitand cfiles 4)))
  117.   (
  118.     (set librarydest
  119.       (askdir
  120.         (prompt  #LibraryDest)
  121.         (default librarydest)
  122.         (help    #LibraryHelp)
  123.       )
  124.     )
  125.     (copylib
  126.       (prompt #InstallLib)
  127.       (help @copylib-help)
  128.       (source "libs/envoyarexx.library") (dest librarydest)
  129.       (confirm)
  130.     )
  131.   )
  132. )
  133.  
  134.  
  135. ;
  136. ; Install the service, if selected
  137. ;
  138.  
  139. (if (<> 0 (bitand cfiles 2))
  140.   (
  141.     (set servicedest
  142.       (askdir
  143.         (prompt  #ServiceDest)
  144.         (default servicedest)
  145.         (help    #ServiceHelp)
  146.       )
  147.     )
  148.     (copylib
  149.       (prompt #InstallSvc)
  150.       (help @copylib-help)
  151.       (source "services/envoyarexx.service") (dest servicedest)
  152.       (confirm)
  153.       (infos)
  154.     )
  155.     (set magicicon
  156.       (askbool
  157.         (prompt #SvcMagicIcon)
  158.         (help   " ")
  159.       )
  160.     )
  161.     (if (= 1 magicicon)
  162.       (
  163.         (copyfiles
  164.           (source "icons/envoyarexx.service.info") (dest servicedest)
  165.         )
  166.       )
  167.     )
  168.   )
  169. )
  170.  
  171.  
  172. ;
  173. ; Install the CLI command, if selected
  174. ;
  175.  
  176. (if (<> 0 (bitand cfiles 4))
  177.   (
  178.     (set clidest
  179.       (askdir
  180.         (prompt  #CLIDest)
  181.         (default clidest)
  182.         (help    @askdir-help)
  183.       )
  184.     )
  185.     (copylib
  186.       (prompt #InstallCH)
  187.       (help @copylib-help)
  188.       (source "c/ConnectHost") (dest clidest)
  189.       (confirm)
  190.     )
  191.     (copylib
  192.       (prompt #InstallDCH)
  193.       (help @copylib-help)
  194.       (source "c/DisConnectHost") (dest clidest)
  195.       (confirm)
  196.     )
  197.   )
  198. )
  199.  
  200.  
  201. ;
  202. ; Copy the example ARexx-script(s), if selected
  203. ;
  204.  
  205. (if (<> 0 (bitand cfiles 8))
  206.   (
  207.     (set rexxdest
  208.       (askdir
  209.         (prompt  #RexxDest)
  210.         (default rexxdest)
  211.         (help    @askdir-help)
  212.       )
  213.     )
  214.     (copylib
  215.       (prompt #InstallRexx1)
  216.       (help @copylib-help)
  217.       (source "rexx/Example.earx") (dest rexxdest)
  218.       (confirm)
  219.       (infos)
  220.     )
  221.   )
  222. )
  223.  
  224.  
  225. ;
  226. ; Copy the manual, if selected
  227. ;
  228.  
  229. (if (<> 0 (bitand cfiles 16))
  230.   (
  231.     (set cman (askoptions (prompt #WhichManuals)
  232.                           (help @askoptions-help)
  233.                           (choices #ManGuide
  234.                                    #ManDVI
  235.                           )
  236.                           (default 1)
  237.               )
  238.     )
  239.  
  240.     (if (<> cman 0)
  241.       (
  242.         (set docdest
  243.           (askdir
  244.             (prompt  #DocDest)
  245.             (default docdest)
  246.             (help    @askdir-help)
  247.           )
  248.         )
  249.  
  250.         (if (<> 0 (bitand cman 1))
  251.           (copyfiles
  252.             (prompt #DocWorking)
  253.             (source "Docs/EnvoyARexx.guide") (dest docdest)
  254.             (infos)
  255.           )
  256.         )
  257.  
  258.         (if (<> 0 (bitand cman 2))
  259.           (copyfiles
  260.             (prompt #DocWorking)
  261.             (source "Docs/EnvoyARexx.dvi") (dest docdest)
  262.             (infos)
  263.           )
  264.         )
  265.  
  266.       )
  267.     )
  268.  
  269.   )
  270. )
  271.  
  272.  
  273. (if (<> 0 (bitand cfiles 2))
  274.   (exit #ByeTextSvc)
  275.   (exit #ByeText)
  276. )
  277.  
  278.  
  279.